<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>用户注册</title>
		<link href="../css/reg.css" type="text/css" rel="stylesheet">
	</head>
	<body>
		<div class="header">
			<div class="container">
				<a href="../index.php"><img src="../img/reglogo.png"></a>
			</div>
		</div>
		<div class="main">
			<div class="container">
				<div class="table">
					<form action="../../admin/useraction.php?a=reg" method="post">
					<input type="hidden" name="pubID" value="regID"><!--隐藏标记便于获取错误编码-->
						<table width="400" border="0" style="border-collapse:separate; border-spacing:0px 30px;">
							<tr>
								<td align="right">用户账号：</td>
								<td><input type="text" name="username"></td>
								<td width="120">
										<span style="color:red">
											<?php
												if($_GET['eno']==4){
														echo '账号不能为空';
													}else if($_GET['eno']==7){
														echo '账号已存在';
													}else{
														echo '(*)必填';
												}
											?>
										</span>
								</td>
							</tr>
							<tr>
								<td align="right">设置密码：</td>
								<td><input type="password" name="pass"></td>
								<td>
									<span style="color:red">
										<?php
											if($_GET['eno']==5){
												echo '密码不能为空';
											}else{
												echo '(*)必填';
											}
										?>
									</span>
								</td>
							</tr>
							<tr>
								<td align="right">常用邮箱：</td>
								<td><input type="text" name="email"></td>
								<td>
									<span style="color:red">
										<?php
											if($_GET['eno']==6){
												echo '邮箱不能为空';
											}else if($_GET['eno']==8){
												echo '邮箱已注册';
											}else{
												echo '(*)必填';
											}
										?>
									</span>
								</td>
							</tr>
							<tr>
								<td align="right">手机号码：</td>
								<td><input type="phone" name="phone"></td>
								<td>
									<span style="color:red">
										<?php
											echo '选填';
										?>
									</span>
								</td>
							</tr>
							<tr>
								<td colspan="2" align="center" >
									验证码：<input type="text" size="7" name="code">
									<img src="../../public/code.php" onclick="this.src='../../public/code.php?id='+Math.random()">
								</td>
								<td>
									<span style="color:red">	
										<?php
											if($_GET['eno']==1){
												echo '验证码错误';
											}
										?>
									</span>
								</td>
							</tr>
							<tr>
								<td colspan="2" align="center">
									<input type="submit" value="立即注册">
								</td>
							</tr>
						</table>
					</form>
					<span>客官已有账号:</span><a href="login.php">请登录</a>
				</div>
				<div class="login">
					<img src = "../img/loginImg.png">
				</div>
			</div>
		</div>
	</body>
</html>